package cn.johnyu.controller;

import cn.johnyu.client.ProductClient;
import cn.johnyu.domain.Order;
import cn.johnyu.service.OrderService;
import org.example.commons.dto.ProductDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;
    @GetMapping("/orders/{id}")
    public Order loadOrder(@PathVariable("id") int id){
        return orderService.loadOrder(id);
    }
}
